+2004-02-03 Federico Mena Quintero <federico@ximian.com>
+
+ Fix #68938.
+
+ * gtk/gtkdialog.c (GtkDialogPrivate): New private structure for
+ GtkDialog; right now it only contains an ignore_separator field.
+ (gtk_dialog_class_init): Register the private structure.
+ (gtk_dialog_init): Initialize the priv->ignore_separator field.
+ (_gtk_dialog_set_ignore_separator): New private function.
+ (gtk_dialog_set_has_separator): Ignore the setting if appropriate.
+
+ * gtk/gtkmessagedialog.c (gtk_message_dialog_class_init): Add a
+ use_separator style property.
+ (gtk_message_dialog_style_set): Change the dialog's separator
+ based on the style property.
+ (gtk_message_dialog_init): Set the dialog box to ignore the
+ separator setting.
+
Tue Feb 3 02:35:09 2004 Matthias Clasen <maclas@gmx.de>
* gtk/Makefile.am: Build filesystemwin32.c if OS_WIN32 and
+2004-02-03 Federico Mena Quintero <federico@ximian.com>
+
+ Fix #68938.
+
+ * gtk/gtkdialog.c (GtkDialogPrivate): New private structure for
+ GtkDialog; right now it only contains an ignore_separator field.
+ (gtk_dialog_class_init): Register the private structure.
+ (gtk_dialog_init): Initialize the priv->ignore_separator field.
+ (_gtk_dialog_set_ignore_separator): New private function.
+ (gtk_dialog_set_has_separator): Ignore the setting if appropriate.
+
+ * gtk/gtkmessagedialog.c (gtk_message_dialog_class_init): Add a
+ use_separator style property.
+ (gtk_message_dialog_style_set): Change the dialog's separator
+ based on the style property.
+ (gtk_message_dialog_init): Set the dialog box to ignore the
+ separator setting.
+
Tue Feb 3 02:35:09 2004 Matthias Clasen <maclas@gmx.de>
* gtk/Makefile.am: Build filesystemwin32.c if OS_WIN32 and
+2004-02-03 Federico Mena Quintero <federico@ximian.com>
+
+ Fix #68938.
+
+ * gtk/gtkdialog.c (GtkDialogPrivate): New private structure for
+ GtkDialog; right now it only contains an ignore_separator field.
+ (gtk_dialog_class_init): Register the private structure.
+ (gtk_dialog_init): Initialize the priv->ignore_separator field.
+ (_gtk_dialog_set_ignore_separator): New private function.
+ (gtk_dialog_set_has_separator): Ignore the setting if appropriate.
+
+ * gtk/gtkmessagedialog.c (gtk_message_dialog_class_init): Add a
+ use_separator style property.
+ (gtk_message_dialog_style_set): Change the dialog's separator
+ based on the style property.
+ (gtk_message_dialog_init): Set the dialog box to ignore the
+ separator setting.
+
Tue Feb 3 02:35:09 2004 Matthias Clasen <maclas@gmx.de>
* gtk/Makefile.am: Build filesystemwin32.c if OS_WIN32 and
+2004-02-03 Federico Mena Quintero <federico@ximian.com>
+
+ Fix #68938.
+
+ * gtk/gtkdialog.c (GtkDialogPrivate): New private structure for
+ GtkDialog; right now it only contains an ignore_separator field.
+ (gtk_dialog_class_init): Register the private structure.
+ (gtk_dialog_init): Initialize the priv->ignore_separator field.
+ (_gtk_dialog_set_ignore_separator): New private function.
+ (gtk_dialog_set_has_separator): Ignore the setting if appropriate.
+
+ * gtk/gtkmessagedialog.c (gtk_message_dialog_class_init): Add a
+ use_separator style property.
+ (gtk_message_dialog_style_set): Change the dialog's separator
+ based on the style property.
+ (gtk_message_dialog_init): Set the dialog box to ignore the
+ separator setting.
+
Tue Feb 3 02:35:09 2004 Matthias Clasen <maclas@gmx.de>
* gtk/Makefile.am: Build filesystemwin32.c if OS_WIN32 and
+2004-02-03 Federico Mena Quintero <federico@ximian.com>
+
+ Fix #68938.
+
+ * gtk/gtkdialog.c (GtkDialogPrivate): New private structure for
+ GtkDialog; right now it only contains an ignore_separator field.
+ (gtk_dialog_class_init): Register the private structure.
+ (gtk_dialog_init): Initialize the priv->ignore_separator field.
+ (_gtk_dialog_set_ignore_separator): New private function.
+ (gtk_dialog_set_has_separator): Ignore the setting if appropriate.
+
+ * gtk/gtkmessagedialog.c (gtk_message_dialog_class_init): Add a
+ use_separator style property.
+ (gtk_message_dialog_style_set): Change the dialog's separator
+ based on the style property.
+ (gtk_message_dialog_init): Set the dialog box to ignore the
+ separator setting.
+
Tue Feb 3 02:35:09 2004 Matthias Clasen <maclas@gmx.de>
* gtk/Makefile.am: Build filesystemwin32.c if OS_WIN32 and
#include "gtkintl.h"
#include "gtkbindings.h"
+#define GET_PRIVATE(obj) (G_TYPE_INSTANCE_GET_PRIVATE ((obj), GTK_TYPE_DIALOG, GtkDialogPrivate))
+
+typedef struct {
+ guint ignore_separator : 1;
+} GtkDialogPrivate;
+
typedef struct _ResponseData ResponseData;
struct _ResponseData
class->close = gtk_dialog_close;
+ g_type_class_add_private (gobject_class, sizeof (GtkDialogPrivate));
+
g_object_class_install_property (gobject_class,
PROP_HAS_SEPARATOR,
g_param_spec_boolean ("has_separator",
static void
gtk_dialog_init (GtkDialog *dialog)
{
+ GtkDialogPrivate *priv;
+
+ priv = GET_PRIVATE (dialog);
+ priv->ignore_separator = FALSE;
+
/* To avoid breaking old code that prevents destroy on delete event
* by connecting a handler, we have to have the FIRST signal
* connection on the dialog.
gtk_dialog_set_has_separator (GtkDialog *dialog,
gboolean setting)
{
+ GtkDialogPrivate *priv;
+
g_return_if_fail (GTK_IS_DIALOG (dialog));
+ priv = GET_PRIVATE (dialog);
+
/* this might fail if we get called before _init() somehow */
g_assert (dialog->vbox != NULL);
+
+ if (priv->ignore_separator)
+ {
+ g_warning ("Ignoring the separator setting");
+ return;
+ }
if (setting && dialog->separator == NULL)
{
return ri.response_id;
}
+
+void
+_gtk_dialog_set_ignore_separator (GtkDialog *dialog,
+ gboolean ignore_separator)
+{
+ GtkDialogPrivate *priv;
+
+ priv = GET_PRIVATE (dialog);
+ priv->ignore_separator = ignore_separator;
+}
/* Returns response_id */
gint gtk_dialog_run (GtkDialog *dialog);
+
+/* For private use only */
+void _gtk_dialog_set_ignore_separator (GtkDialog *dialog,
+ gboolean ignore_separator);
+
#ifdef __cplusplus
}
#endif /* __cplusplus */
G_MAXINT,
8,
G_PARAM_READABLE));
+ gtk_widget_class_install_style_property (widget_class,
+ g_param_spec_boolean ("use_separator",
+ P_("Use separator"),
+ P_("Whether to put a separator between the message dialog's text and the buttons"),
+ FALSE,
+ G_PARAM_READABLE));
g_object_class_install_property (gobject_class,
PROP_MESSAGE_TYPE,
g_param_spec_enum ("message_type",
FALSE, FALSE, 0);
gtk_widget_show_all (hbox);
+
+ _gtk_dialog_set_ignore_separator (GTK_DIALOG (dialog), TRUE);
}
static GtkMessageType
{
GtkWidget *parent;
gint border_width = 0;
+ gboolean use_separator;
parent = GTK_WIDGET (GTK_MESSAGE_DIALOG (widget)->image->parent);
border_width);
}
+ gtk_widget_style_get (widget,
+ "use_separator", &use_separator,
+ NULL);
+ _gtk_dialog_set_ignore_separator (GTK_DIALOG (widget), FALSE);
+ gtk_dialog_set_has_separator (GTK_DIALOG (widget), use_separator);
+ _gtk_dialog_set_ignore_separator (GTK_DIALOG (widget), TRUE);
+
if (GTK_WIDGET_CLASS (parent_class)->style_set)
(GTK_WIDGET_CLASS (parent_class)->style_set) (widget, prev_style);
}